package selenium;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import utils.ReportWriter;


public class driverOperation  {

    static public WebDriver driver;

    @BeforeSuite
    public void OpenBrowser() {
        try {
            driver = new FirefoxDriver();
        }
        catch(Exception e) {
            ReportWriter.error("Browser can not be opened");
        }
    }

    @AfterSuite
    public void CloseBrowser() {
        try {
            driver.quit();
        }
        catch(Exception e) {
            ReportWriter.error("Browser can not be closed");
        }
    }

}
